from flask import Flask, render_template

app = Flask(__name__)

student = {
	'name': 'zhangsan',
	'age': 38,
	'gender': '女'
}

@app.route('/str')
def hello_world():  # put application's code here
	return render_template('06-列表过滤器.html')


def get_top_3(lit):
	return lit[:3]

@app.template_filter('get_qu')
def get_qu(lit):
	return list(map(lambda x: x * x, lit))

app.jinja_env.filters['get_top'] = get_top_3


@app.route('/cos')
def cos():
    return render_template('06-列表过滤器.html')
if __name__ == '__main__':
	app.run(debug = True)
